<template>
	<view class="footer-box">


		<view v-if="siteInfo" class="footer">

			<text>数据由</text>
			<navigator url="/pages/paper/paper?type=about" class="link" :style="'color:'+color"> {{ee.account?.name}}
			</navigator> 
			<text>提供</text>

		</view>
		<view class="footer-ad">
			<view class="ad-title"> {{ee.company.linkmark}}</view>
			<view class="ad-action">
				<up-tag @click="gohome" text="回首页" type="warning" size="mini" plain shape="circle"></up-tag>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "kb-footer",
		props: {
			color: {
				type: String,
				default: '#007AFF'
			},
			account: {
				type: Object,
				validator: function(value) {
					// 返回true或false，表示value是否符合要求
					return value !== null && typeof value === 'object';
				}
			}
		},
		data() {
			return {

			};
		},
		computed: {
			siteInfo() {
				return this.account || this.ee.account || {}
			}
		},
		methods: {
			gohome() {
				uni.redirectTo({

					url: "/pages/index"
				})
			}
		}
	}
</script>

<style>
	.footer-box {
		padding-top: 30rpx;
		padding-bottom: 60rpx;
		text-align: center;
		font-size: 20rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		/* background-color: #fff; */
	}

	.footer {
		display: flex;
		justify-content: center;
		align-items: center;
		margin-top: 10rpx;
		color: #888;
	}

	.link {
		color: #007AFF;
	}

	.footer-ad {
		line-height: 60rpx;
		color: #888;
	}

	.ad-action {
		margin-top: 20rpx;
		text-align: center;
		display: flex;
		justify-content: center;
	}
</style>